<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: aruntime/src/main/java/nars/io/StringParser.java Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d7/dcd/StringParser_8java_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">StringParser.java</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../d7/dcd/StringParser_8java.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * StringParser.java</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (C) 2008  Pei Wang</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * This file is part of Open-NARS.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * Open-NARS is free software; you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * the Free Software Foundation, either version 2 of the License, or</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * Open-NARS is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * along with Open-NARS.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">package </span>nars.io;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">import</span> java.util.*;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">//import deductions.runtime.swing.TemporaryFrame;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.<a class="code" href="../../db/dec/namespacenars_1_1entity.html">entity</a>.*;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.<a class="code" href="../../d9/d79/namespacenars_1_1inference.html">inference</a>.*;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.<a class="code" href="../../d0/d72/namespacenars_1_1language.html">language</a>.*;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.<a class="code" href="../../de/ddc/namespacenars_1_1storage.html">storage</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a>;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser.html">   36</a></span>&#160;<span class="keyword">public</span> <span class="keyword">abstract</span> <span class="keyword">class </span><a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser.html">StringParser</a> <span class="keyword">extends</span> <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols.html">Symbols</a> {</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">   41</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">class </span><a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a> <span class="keyword">extends</span> Exception {</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException_a3a93516417d09738e6742c6b4b95d181.html#a3a93516417d09738e6742c6b4b95d181">   47</a></span>&#160;        <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException_a3a93516417d09738e6742c6b4b95d181.html#a3a93516417d09738e6742c6b4b95d181">InvalidInputException</a>(String s) {</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            super(s);</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        }</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    }</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a37ff864d959aba58138170a3f9a3e7c8.html#a37ff864d959aba58138170a3f9a3e7c8">   61</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a37ff864d959aba58138170a3f9a3e7c8.html#a37ff864d959aba58138170a3f9a3e7c8">parseExperience</a>(StringBuffer buffer, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory, <span class="keywordtype">long</span> time) {</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keywordtype">int</span> i = buffer.indexOf(<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a52a0cc8bcdfeb683433fb4dfdd167554.html#a52a0cc8bcdfeb683433fb4dfdd167554">PREFIX_MARK</a> + <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordflow">if</span> (i &gt; 0) {</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;            String prefix = buffer.substring(0, i).trim();</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;            <span class="keywordflow">if</span> (prefix.equals(<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_aa8d204dd29cc8dd9793f8dfe7c4ff979.html#aa8d204dd29cc8dd9793f8dfe7c4ff979">OUTPUT_LINE</a>)) {</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;                <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (prefix.equals(<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a75b6ca172df6ae3f0d06cf70d3d2ec1c.html#a75b6ca172df6ae3f0d06cf70d3d2ec1c">INPUT_LINE</a>)) {</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                buffer.delete(0, i + 1);</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;            }</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        }</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <span class="keywordtype">char</span> c = buffer.charAt(buffer.length() - 1);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keywordflow">if</span> (c == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a773509e7bc6cbf7b365c90fc2e48dc6b.html#a773509e7bc6cbf7b365c90fc2e48dc6b">STAMP_CLOSER</a>) {</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            <span class="keywordtype">int</span> j = buffer.lastIndexOf(<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a8543cf41a20f45b3e2ece8b7969ed15b.html#a8543cf41a20f45b3e2ece8b7969ed15b">STAMP_OPENER</a> + <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            buffer.delete(j - 1, buffer.length());</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        }</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a75b446999d71c676a9915ecc75077a7d.html#a75b446999d71c676a9915ecc75077a7d">parseTask</a>(buffer.toString().trim(), memory, time);</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    }</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a75b446999d71c676a9915ecc75077a7d.html#a75b446999d71c676a9915ecc75077a7d">   86</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a75b446999d71c676a9915ecc75077a7d.html#a75b446999d71c676a9915ecc75077a7d">parseTask</a>(String s, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory, <span class="keywordtype">long</span> time) {</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        StringBuffer buffer = <span class="keyword">new</span> StringBuffer(s);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a> task = null;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            String budgetString = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a26d10b6f39341c34897a5e4c66112bd9.html#a26d10b6f39341c34897a5e4c66112bd9">getBudgetString</a>(buffer);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            String truthString = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a2f7d01638f8e9c5e2e1e1500689b5fc8.html#a2f7d01638f8e9c5e2e1e1500689b5fc8">getTruthString</a>(buffer);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            String str = buffer.toString().trim();</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            <span class="keywordtype">int</span> last = str.length() - 1;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            <span class="keywordtype">char</span> punc = str.charAt(last);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            <a class="code" href="../../d1/d1e/classnars_1_1entity_1_1Stamp.html">Stamp</a> stamp = <span class="keyword">new</span> <a class="code" href="../../d1/d1e/classnars_1_1entity_1_1Stamp.html">Stamp</a>(time);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> truth = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a49d3b8184f455de9685937d0aa2f6a93.html#a49d3b8184f455de9685937d0aa2f6a93">parseTruth</a>(truthString, punc);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> content = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a5c31494d6f7862dcf15a4d5716b6200e.html#a5c31494d6f7862dcf15a4d5716b6200e">parseTerm</a>(str.substring(0, last), memory);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="comment">//            if (content instanceof CompoundTerm) { // all top-level compound terms are assumed to be constant</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="comment">//                ((CompoundTerm) content).setConstant(true);</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="comment">//            }</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="comment">//            Sentence sentence = Sentence.make(content, punc, truth, stamp);</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            <a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">Sentence</a> sentence = <span class="keyword">new</span> <a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">Sentence</a>(content, punc, truth, stamp);</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;            <span class="keywordflow">if</span> ((content instanceof <a class="code" href="../../d6/d98/classnars_1_1language_1_1Conjunction.html">Conjunction</a>) &amp;&amp; <a class="code" href="../../de/da5/classnars_1_1language_1_1Variable.html">Variable</a>.<a class="code" href="../../de/da5/classnars_1_1language_1_1Variable_a3a7ee29b5a23255edf3dbca5f85f7b44.html#a3a7ee29b5a23255edf3dbca5f85f7b44">containVarDep</a>(content.<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a3aad4654016b8615fd4fa8a26668e1db.html#a3aad4654016b8615fd4fa8a26668e1db">getName</a>())) {</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;                sentence.setRevisible(<span class="keyword">false</span>);</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;            }</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="comment">//            if (sentence == null) {</span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="comment">//                throw new InvalidInputException(&quot;invalid sentence&quot;);</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="comment">//            }</span></div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="comment">//            sentence.setInput();</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;            <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> budget = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a4d012f80fe3fabafafdd7ffd31bb9d23.html#a4d012f80fe3fabafafdd7ffd31bb9d23">parseBudget</a>(budgetString, punc, truth);</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            task = <span class="keyword">new</span> <a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a>(sentence, budget);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        } <span class="keywordflow">catch</span> (<a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a> e) {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            String message = <span class="stringliteral">&quot; !!! INVALID INPUT: parseTask: &quot;</span> + buffer + <span class="stringliteral">&quot; --- &quot;</span> + e.getMessage();</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;            System.out.println(message);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;            <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a4fc8012616d44d8e7670044f9a0d2976.html#a4fc8012616d44d8e7670044f9a0d2976">showWarning</a>(message);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        }</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="keywordflow">return</span> task;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    }</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="comment">/* ---------- parse values ---------- */</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a26d10b6f39341c34897a5e4c66112bd9.html#a26d10b6f39341c34897a5e4c66112bd9">  127</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> String <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a26d10b6f39341c34897a5e4c66112bd9.html#a26d10b6f39341c34897a5e4c66112bd9">getBudgetString</a>(StringBuffer s) <span class="keywordflow">throws</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a> {</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <span class="keywordflow">if</span> (s.charAt(0) != <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a42009f5202d1b120b098593f7b48dbad.html#a42009f5202d1b120b098593f7b48dbad">BUDGET_VALUE_MARK</a>) {</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        }</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keywordtype">int</span> i = s.indexOf(<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a42009f5202d1b120b098593f7b48dbad.html#a42009f5202d1b120b098593f7b48dbad">BUDGET_VALUE_MARK</a> + <span class="stringliteral">&quot;&quot;</span>, 1);    <span class="comment">// looking for the end</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <span class="keywordflow">if</span> (i &lt; 0) {</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;missing budget closer&quot;</span>);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        }</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        String budgetString = s.substring(1, i).trim();</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <span class="keywordflow">if</span> (budgetString.length() == 0) {</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;empty budget&quot;</span>);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        }</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        s.delete(0, i + 1);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <span class="keywordflow">return</span> budgetString;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    }</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a2f7d01638f8e9c5e2e1e1500689b5fc8.html#a2f7d01638f8e9c5e2e1e1500689b5fc8">  149</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> String <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a2f7d01638f8e9c5e2e1e1500689b5fc8.html#a2f7d01638f8e9c5e2e1e1500689b5fc8">getTruthString</a>(StringBuffer s) <span class="keywordflow">throws</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a> {</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="keywordtype">int</span> last = s.length() - 1;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <span class="keywordflow">if</span> (s.charAt(last) != <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a1487df93cb7e583ecaec1f9b8a7941cd.html#a1487df93cb7e583ecaec1f9b8a7941cd">TRUTH_VALUE_MARK</a>) {       <span class="comment">// use default</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;            <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        }</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="keywordtype">int</span> first = s.indexOf(<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a1487df93cb7e583ecaec1f9b8a7941cd.html#a1487df93cb7e583ecaec1f9b8a7941cd">TRUTH_VALUE_MARK</a> + <span class="stringliteral">&quot;&quot;</span>);    <span class="comment">// looking for the beginning</span></div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keywordflow">if</span> (first == last) { <span class="comment">// no matching closer</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;missing truth mark&quot;</span>);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        }</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        String truthString = s.substring(first + 1, last).trim();</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="keywordflow">if</span> (truthString.length() == 0) {                <span class="comment">// empty usage</span></div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;empty truth&quot;</span>);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        }</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        s.delete(first, last + 1);                 <span class="comment">// remaining input to be processed outside</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        s.trimToSize();</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keywordflow">return</span> truthString;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    }</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a49d3b8184f455de9685937d0aa2f6a93.html#a49d3b8184f455de9685937d0aa2f6a93">  173</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a49d3b8184f455de9685937d0aa2f6a93.html#a49d3b8184f455de9685937d0aa2f6a93">parseTruth</a>(String s, <span class="keywordtype">char</span> type) {</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <span class="keywordflow">if</span> (type == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a771c007b010d86c032ee6d181f080ed8.html#a771c007b010d86c032ee6d181f080ed8">QUESTION_MARK</a>) {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;            <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        }</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="keywordtype">float</span> frequency = 1.0f;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        <span class="keywordtype">float</span> confidence = <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters.html">Parameters</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_a9b02deb2e403b931a0809a14c1754ae1.html#a9b02deb2e403b931a0809a14c1754ae1">DEFAULT_JUDGMENT_CONFIDENCE</a>;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <span class="keywordflow">if</span> (s != null) {</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            <span class="keywordtype">int</span> i = s.indexOf(<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a303071a44dc2adfc5d1b0a51058b9eb4.html#a303071a44dc2adfc5d1b0a51058b9eb4">VALUE_SEPARATOR</a>);</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;            <span class="keywordflow">if</span> (i &lt; 0) {</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;                frequency = Float.parseFloat(s);</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                frequency = Float.parseFloat(s.substring(0, i));</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;                confidence = Float.parseFloat(s.substring(i + 1));</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        }</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a>(frequency, confidence);</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    }</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div>
<div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a4d012f80fe3fabafafdd7ffd31bb9d23.html#a4d012f80fe3fabafafdd7ffd31bb9d23">  200</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a4d012f80fe3fabafafdd7ffd31bb9d23.html#a4d012f80fe3fabafafdd7ffd31bb9d23">parseBudget</a>(String s, <span class="keywordtype">char</span> punctuation, <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> truth) <span class="keywordflow">throws</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a> {</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keywordtype">float</span> priority, durability;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <span class="keywordflow">switch</span> (punctuation) {</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a13b034b1bca44b2f3d3c8de6d1607047.html#a13b034b1bca44b2f3d3c8de6d1607047">JUDGMENT_MARK</a>:</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;                priority = <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters.html">Parameters</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_a19b3ac0c78139a1e780b01c9aeaebb24.html#a19b3ac0c78139a1e780b01c9aeaebb24">DEFAULT_JUDGMENT_PRIORITY</a>;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;                durability = <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters.html">Parameters</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_a0e475172e99cbaf68ced7ec12e39fa52.html#a0e475172e99cbaf68ced7ec12e39fa52">DEFAULT_JUDGMENT_DURABILITY</a>;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a771c007b010d86c032ee6d181f080ed8.html#a771c007b010d86c032ee6d181f080ed8">QUESTION_MARK</a>:</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;                priority = <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters.html">Parameters</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_a8baa6ec51e3c1b2be699ce7010edbd72.html#a8baa6ec51e3c1b2be699ce7010edbd72">DEFAULT_QUESTION_PRIORITY</a>;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;                durability = <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters.html">Parameters</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_acbc0d248cbd19cca521940073d596846.html#acbc0d248cbd19cca521940073d596846">DEFAULT_QUESTION_DURABILITY</a>;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;unknown punctuation: &#39;&quot;</span> + punctuation + <span class="stringliteral">&quot;&#39;&quot;</span>);</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        }</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        <span class="keywordflow">if</span> (s != null) { <span class="comment">// overrite default</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;            <span class="keywordtype">int</span> i = s.indexOf(<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a303071a44dc2adfc5d1b0a51058b9eb4.html#a303071a44dc2adfc5d1b0a51058b9eb4">VALUE_SEPARATOR</a>);</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;            <span class="keywordflow">if</span> (i &lt; 0) {        <span class="comment">// default durability</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;                priority = Float.parseFloat(s);</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                priority = Float.parseFloat(s.substring(0, i));</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                durability = Float.parseFloat(s.substring(i + 1));</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            }</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        }</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        <span class="keywordtype">float</span> quality = (truth == null) ? 1 : <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions.html">BudgetFunctions</a>.<a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">truthToQuality</a>(truth);</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a>(priority, durability, quality);</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    }</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    <span class="comment">/* ---------- parse String into term ---------- */</span></div>
<div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a5c31494d6f7862dcf15a4d5716b6200e.html#a5c31494d6f7862dcf15a4d5716b6200e">  241</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a5c31494d6f7862dcf15a4d5716b6200e.html#a5c31494d6f7862dcf15a4d5716b6200e">parseTerm</a>(String s0, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) {</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        String s = s0.trim();</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;            <span class="keywordflow">if</span> (s.length() == 0) {</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;missing content&quot;</span>);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;            }</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> t = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a63058cc52d77412e0aead8387c23aa93.html#a63058cc52d77412e0aead8387c23aa93">nameToListedTerm</a>(s);    <span class="comment">// existing constant or operator</span></div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;            <span class="keywordflow">if</span> (t != null) {</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                <span class="keywordflow">return</span> t;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;            }                           <span class="comment">// existing Term</span></div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;            <span class="keywordtype">int</span> index = s.length() - 1;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;            <span class="keywordtype">char</span> first = s.charAt(0);</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;            <span class="keywordtype">char</span> last = s.charAt(index);</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;            <span class="keywordflow">switch</span> (first) {</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_ae7288e11164656038caf396c2c4b7a58.html#ae7288e11164656038caf396c2c4b7a58">COMPOUND_TERM_OPENER</a>:</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                    <span class="keywordflow">if</span> (last == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_ab9662b963cff657c1089b306d3594efe.html#ab9662b963cff657c1089b306d3594efe">COMPOUND_TERM_CLOSER</a>) {</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;                        <span class="keywordflow">return</span> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a944bb677dff9f232ce6b896c853e24e0.html#a944bb677dff9f232ce6b896c853e24e0">parseCompoundTerm</a>(s.substring(1, index), memory);</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                        <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;missing CompoundTerm closer&quot;</span>);</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                    }</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a3bc6ba8295af16e7dc108ea61af132c4.html#a3bc6ba8295af16e7dc108ea61af132c4">SET_EXT_OPENER</a>:</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;                    <span class="keywordflow">if</span> (last == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_aed850ddff0dd1a47065099f5fccd5dfe.html#aed850ddff0dd1a47065099f5fccd5dfe">SET_EXT_CLOSER</a>) {</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;                        <span class="keywordflow">return</span> <a class="code" href="../../de/d1d/classnars_1_1language_1_1SetExt.html">SetExt</a>.<a class="code" href="../../de/d1d/classnars_1_1language_1_1SetExt_aa8f6526a59c3d7e578dd76a0eab75a0e.html#aa8f6526a59c3d7e578dd76a0eab75a0e">make</a>(<a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a7a11182c36a2fae68be8952110f47570.html#a7a11182c36a2fae68be8952110f47570">parseArguments</a>(s.substring(1, index) + <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_ab78cb07d148cc233baf7f43ee8d302e9.html#ab78cb07d148cc233baf7f43ee8d302e9">ARGUMENT_SEPARATOR</a>, memory), memory);</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;                    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;                        <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;missing ExtensionSet closer&quot;</span>);</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;                    }</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a54fee577660cb416592b3ee290e6a7c5.html#a54fee577660cb416592b3ee290e6a7c5">SET_INT_OPENER</a>:</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;                    <span class="keywordflow">if</span> (last == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_aea87151443aa0d48255ee040f32bd1d0.html#aea87151443aa0d48255ee040f32bd1d0">SET_INT_CLOSER</a>) {</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;                        <span class="keywordflow">return</span> <a class="code" href="../../d2/dfc/classnars_1_1language_1_1SetInt.html">SetInt</a>.<a class="code" href="../../d2/dfc/classnars_1_1language_1_1SetInt_aaea0f2cc2ca804779d1bf346beb58fa1.html#aaea0f2cc2ca804779d1bf346beb58fa1">make</a>(<a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a7a11182c36a2fae68be8952110f47570.html#a7a11182c36a2fae68be8952110f47570">parseArguments</a>(s.substring(1, index) + <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_ab78cb07d148cc233baf7f43ee8d302e9.html#ab78cb07d148cc233baf7f43ee8d302e9">ARGUMENT_SEPARATOR</a>, memory), memory);</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;                    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;                        <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;missing IntensionSet closer&quot;</span>);</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;                    }</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_abc6f38df6d7517b21ecf27b34da1a2ea.html#abc6f38df6d7517b21ecf27b34da1a2ea">STATEMENT_OPENER</a>:</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;                    <span class="keywordflow">if</span> (last == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a3c16442588a8be88035d635e13c8c486.html#a3c16442588a8be88035d635e13c8c486">STATEMENT_CLOSER</a>) {</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;                        <span class="keywordflow">return</span> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a7c129938c8d721e3db0a9804988f0588.html#a7c129938c8d721e3db0a9804988f0588">parseStatement</a>(s.substring(1, index), memory);</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;                    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;                        <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;missing Statement closer&quot;</span>);</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;                    }</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;                <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;                    <span class="keywordflow">return</span> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a4521720744de2b8638667be01b4be64a.html#a4521720744de2b8638667be01b4be64a">parseAtomicTerm</a>(s);</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;            }</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        } <span class="keywordflow">catch</span> (<a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a> e) {</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;            String message = <span class="stringliteral">&quot; !!! INVALID INPUT: parseTerm: &quot;</span> + s + <span class="stringliteral">&quot; --- &quot;</span> + e.getMessage();</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;            System.out.println(message);</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;            <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a4fc8012616d44d8e7670044f9a0d2976.html#a4fc8012616d44d8e7670044f9a0d2976">showWarning</a>(message);</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        }</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        <span class="keywordflow">return</span> null;</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    }</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;</div>
<div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a4fc8012616d44d8e7670044f9a0d2976.html#a4fc8012616d44d8e7670044f9a0d2976">  290</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a4fc8012616d44d8e7670044f9a0d2976.html#a4fc8012616d44d8e7670044f9a0d2976">showWarning</a>(String message) {</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;<span class="comment">//      new TemporaryFrame( message + &quot;\n( the faulty line has been kept in the input window )&quot;,</span></div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;<span class="comment">//              40000, TemporaryFrame.WARNING );</span></div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    }</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div>
<div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a4521720744de2b8638667be01b4be64a.html#a4521720744de2b8638667be01b4be64a">  303</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a4521720744de2b8638667be01b4be64a.html#a4521720744de2b8638667be01b4be64a">parseAtomicTerm</a>(String s0) <span class="keywordflow">throws</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a> {</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;        String s = s0.trim();</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;        <span class="keywordflow">if</span> (s.length() == 0) {</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;missing term&quot;</span>);</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;        }</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        <span class="keywordflow">if</span> (s.contains(<span class="stringliteral">&quot; &quot;</span>)) <span class="comment">// invalid characters in a name</span></div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;        {</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;invalid term&quot;</span>);</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;        }</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="../../de/da5/classnars_1_1language_1_1Variable.html">Variable</a>.<a class="code" href="../../de/da5/classnars_1_1language_1_1Variable_a2c36e85a56295a27aba7a4ee162f5850.html#a2c36e85a56295a27aba7a4ee162f5850">containVar</a>(s)) {</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../de/da5/classnars_1_1language_1_1Variable.html">Variable</a>(s);</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a>(s);</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;        }</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;    }</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;</div>
<div class="line"><a name="l00325"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a7c129938c8d721e3db0a9804988f0588.html#a7c129938c8d721e3db0a9804988f0588">  325</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement.html">Statement</a> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a7c129938c8d721e3db0a9804988f0588.html#a7c129938c8d721e3db0a9804988f0588">parseStatement</a>(String s0, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) <span class="keywordflow">throws</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a> {</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;        String s = s0.trim();</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;        <span class="keywordtype">int</span> i = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a841830a5d2348da4024f4db083b37c2a.html#a841830a5d2348da4024f4db083b37c2a">topRelation</a>(s);</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;        <span class="keywordflow">if</span> (i &lt; 0) {</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;invalid statement&quot;</span>);</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;        }</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;        String relation = s.substring(i, i + 3);</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;        <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> subject = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a5c31494d6f7862dcf15a4d5716b6200e.html#a5c31494d6f7862dcf15a4d5716b6200e">parseTerm</a>(s.substring(0, i), memory);</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;        <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> predicate = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a5c31494d6f7862dcf15a4d5716b6200e.html#a5c31494d6f7862dcf15a4d5716b6200e">parseTerm</a>(s.substring(i + 3), memory);</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;        <a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement.html">Statement</a> t = <a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement.html">Statement</a>.<a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement_a4e4c29fc305a6741da88ce55fbf11e4a.html#a4e4c29fc305a6741da88ce55fbf11e4a">make</a>(relation, subject, predicate, memory);</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;        <span class="keywordflow">if</span> (t == null) {</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;invalid statement&quot;</span>);</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;        }</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;        <span class="keywordflow">return</span> t;</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    }</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;</div>
<div class="line"><a name="l00347"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a944bb677dff9f232ce6b896c853e24e0.html#a944bb677dff9f232ce6b896c853e24e0">  347</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a944bb677dff9f232ce6b896c853e24e0.html#a944bb677dff9f232ce6b896c853e24e0">parseCompoundTerm</a>(String s0, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) <span class="keywordflow">throws</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a> {</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;        String s = s0.trim();</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;        <span class="keywordtype">int</span> firstSeparator = s.indexOf(<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_ab78cb07d148cc233baf7f43ee8d302e9.html#ab78cb07d148cc233baf7f43ee8d302e9">ARGUMENT_SEPARATOR</a>);</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;        String op = s.substring(0, firstSeparator).trim();</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="../../d0/dee/classnars_1_1language_1_1CompoundTerm.html">CompoundTerm</a>.<a class="code" href="../../d0/dee/classnars_1_1language_1_1CompoundTerm_ad1d227398882f18af4624dd506c807c5.html#ad1d227398882f18af4624dd506c807c5">isOperator</a>(op)) {</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;unknown operator: &quot;</span> + op);</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;        }</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;        ArrayList&lt;Term&gt; arg = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a7a11182c36a2fae68be8952110f47570.html#a7a11182c36a2fae68be8952110f47570">parseArguments</a>(s.substring(firstSeparator + 1) + <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_ab78cb07d148cc233baf7f43ee8d302e9.html#ab78cb07d148cc233baf7f43ee8d302e9">ARGUMENT_SEPARATOR</a>, memory);</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;        <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> t = <a class="code" href="../../d0/dee/classnars_1_1language_1_1CompoundTerm.html">CompoundTerm</a>.<a class="code" href="../../d0/dee/classnars_1_1language_1_1CompoundTerm_ae4b161399fd4fa864f9a5cf6e1a4ed83.html#ae4b161399fd4fa864f9a5cf6e1a4ed83">make</a>(op, arg, memory);</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;        <span class="keywordflow">if</span> (t == null) {</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;invalid compound term&quot;</span>);</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        }</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;        <span class="keywordflow">return</span> t;</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;    }</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;</div>
<div class="line"><a name="l00368"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a7a11182c36a2fae68be8952110f47570.html#a7a11182c36a2fae68be8952110f47570">  368</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> ArrayList&lt;Term&gt; <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a7a11182c36a2fae68be8952110f47570.html#a7a11182c36a2fae68be8952110f47570">parseArguments</a>(String s0, <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> memory) <span class="keywordflow">throws</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a> {</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;        String s = s0.trim();</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;        ArrayList&lt;Term&gt; list = <span class="keyword">new</span> ArrayList&lt;Term&gt;();</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;        <span class="keywordtype">int</span> start = 0;</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        <span class="keywordtype">int</span> end = 0;</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> t;</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;        <span class="keywordflow">while</span> (end &lt; s.length() - 1) {</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;            end = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_aa197c4c362373f0e74165794ba7b033a.html#aa197c4c362373f0e74165794ba7b033a">nextSeparator</a>(s, start);</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;            t = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a5c31494d6f7862dcf15a4d5716b6200e.html#a5c31494d6f7862dcf15a4d5716b6200e">parseTerm</a>(s.substring(start, end), memory);     <span class="comment">// recursive call</span></div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;            list.add(t);</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;            start = end + 1;</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;        }</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;        <span class="keywordflow">if</span> (list.isEmpty()) {</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;            <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">InvalidInputException</a>(<span class="stringliteral">&quot;null argument&quot;</span>);</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;        }</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;        <span class="keywordflow">return</span> list;</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    }</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;    <span class="comment">/* ---------- locate top-level substring ---------- */</span></div>
<div class="line"><a name="l00393"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_aa197c4c362373f0e74165794ba7b033a.html#aa197c4c362373f0e74165794ba7b033a">  393</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_aa197c4c362373f0e74165794ba7b033a.html#aa197c4c362373f0e74165794ba7b033a">nextSeparator</a>(String s, <span class="keywordtype">int</span> first) {</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;        <span class="keywordtype">int</span> levelCounter = 0;</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;        <span class="keywordtype">int</span> i = first;</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;        <span class="keywordflow">while</span> (i &lt; s.length() - 1) {</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_ae9b91054186389c3930bc2aaecd4aee8.html#ae9b91054186389c3930bc2aaecd4aee8">isOpener</a>(s, i)) {</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;                levelCounter++;</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_aa579e2d90aa176b8fa99af6fda484bf7.html#aa579e2d90aa176b8fa99af6fda484bf7">isCloser</a>(s, i)) {</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;                levelCounter--;</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (s.charAt(i) == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_ab78cb07d148cc233baf7f43ee8d302e9.html#ab78cb07d148cc233baf7f43ee8d302e9">ARGUMENT_SEPARATOR</a>) {</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;                <span class="keywordflow">if</span> (levelCounter == 0) {</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;                }</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;            }</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;            i++;</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        }</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;        <span class="keywordflow">return</span> i;</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;    }</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;</div>
<div class="line"><a name="l00416"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_a841830a5d2348da4024f4db083b37c2a.html#a841830a5d2348da4024f4db083b37c2a">  416</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a841830a5d2348da4024f4db083b37c2a.html#a841830a5d2348da4024f4db083b37c2a">topRelation</a>(String s) {      <span class="comment">// need efficiency improvement</span></div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;        <span class="keywordtype">int</span> levelCounter = 0;</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;        <span class="keywordtype">int</span> i = 0;</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;        <span class="keywordflow">while</span> (i &lt; s.length() - 3) {    <span class="comment">// don&#39;t need to check the last 3 characters</span></div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;            <span class="keywordflow">if</span> ((levelCounter == 0) &amp;&amp; (<a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement.html">Statement</a>.<a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement_aef04a664a5871b608c654a3dbb7cfa84.html#aef04a664a5871b608c654a3dbb7cfa84">isRelation</a>(s.substring(i, i + 3)))) {</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;                <span class="keywordflow">return</span> i;</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;            }</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_ae9b91054186389c3930bc2aaecd4aee8.html#ae9b91054186389c3930bc2aaecd4aee8">isOpener</a>(s, i)) {</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;                levelCounter++;</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_aa579e2d90aa176b8fa99af6fda484bf7.html#aa579e2d90aa176b8fa99af6fda484bf7">isCloser</a>(s, i)) {</div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;                levelCounter--;</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;            }</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;            i++;</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;        }</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;        <span class="keywordflow">return</span> -1;</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    }</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;    <span class="comment">/* ---------- recognize symbols ---------- */</span></div>
<div class="line"><a name="l00440"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_ae9b91054186389c3930bc2aaecd4aee8.html#ae9b91054186389c3930bc2aaecd4aee8">  440</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">boolean</span> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_ae9b91054186389c3930bc2aaecd4aee8.html#ae9b91054186389c3930bc2aaecd4aee8">isOpener</a>(String s, <span class="keywordtype">int</span> i) {</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;        <span class="keywordtype">char</span> c = s.charAt(i);</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;        <span class="keywordtype">boolean</span> b = (c == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_ae7288e11164656038caf396c2c4b7a58.html#ae7288e11164656038caf396c2c4b7a58">COMPOUND_TERM_OPENER</a>) ||</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;                (c == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a3bc6ba8295af16e7dc108ea61af132c4.html#a3bc6ba8295af16e7dc108ea61af132c4">SET_EXT_OPENER</a>) ||</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;                (c == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a54fee577660cb416592b3ee290e6a7c5.html#a54fee577660cb416592b3ee290e6a7c5">SET_INT_OPENER</a>) ||</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;                (c == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_abc6f38df6d7517b21ecf27b34da1a2ea.html#abc6f38df6d7517b21ecf27b34da1a2ea">STATEMENT_OPENER</a>);</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;        <span class="keywordflow">if</span> (!b) {</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;        }</div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;        <span class="keywordflow">if</span> (i + 3 &lt;= s.length() &amp;&amp; <a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement.html">Statement</a>.<a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement_aef04a664a5871b608c654a3dbb7cfa84.html#aef04a664a5871b608c654a3dbb7cfa84">isRelation</a>(s.substring(i, i + 3))) {</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;        }</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;    }</div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;</div>
<div class="line"><a name="l00461"></a><span class="lineno"><a class="line" href="../../d3/dca/classnars_1_1io_1_1StringParser_aa579e2d90aa176b8fa99af6fda484bf7.html#aa579e2d90aa176b8fa99af6fda484bf7">  461</a></span>&#160;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keywordtype">boolean</span> <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_aa579e2d90aa176b8fa99af6fda484bf7.html#aa579e2d90aa176b8fa99af6fda484bf7">isCloser</a>(String s, <span class="keywordtype">int</span> i) {</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;        <span class="keywordtype">char</span> c = s.charAt(i);</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;        <span class="keywordtype">boolean</span> b = (c == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_ab9662b963cff657c1089b306d3594efe.html#ab9662b963cff657c1089b306d3594efe">COMPOUND_TERM_CLOSER</a>) ||</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;                (c == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_aed850ddff0dd1a47065099f5fccd5dfe.html#aed850ddff0dd1a47065099f5fccd5dfe">SET_EXT_CLOSER</a>) ||</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;                (c == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_aea87151443aa0d48255ee040f32bd1d0.html#aea87151443aa0d48255ee040f32bd1d0">SET_INT_CLOSER</a>) ||</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;                (c == <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a3c16442588a8be88035d635e13c8c486.html#a3c16442588a8be88035d635e13c8c486">STATEMENT_CLOSER</a>);</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;        <span class="keywordflow">if</span> (!b) {</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;        }</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;        <span class="keywordflow">if</span> (i &gt;= 2 &amp;&amp; <a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement.html">Statement</a>.<a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement_aef04a664a5871b608c654a3dbb7cfa84.html#aef04a664a5871b608c654a3dbb7cfa84">isRelation</a>(s.substring(i - 2, i + 1))) {</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;        }</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;    }</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;}</div>
<div class="ttc" id="classnars_1_1language_1_1SetExt_aa8f6526a59c3d7e578dd76a0eab75a0e_html_aa8f6526a59c3d7e578dd76a0eab75a0e"><div class="ttname"><a href="../../de/d1d/classnars_1_1language_1_1SetExt_aa8f6526a59c3d7e578dd76a0eab75a0e.html#aa8f6526a59c3d7e578dd76a0eab75a0e">nars.language.SetExt.make</a></div><div class="ttdeci">static Term make(Term t, Memory memory)</div><div class="ttdoc">Try to make a new set from one component. </div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d96/SetExt_8java_source.html#l00067">SetExt.java:67</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Conjunction_html"><div class="ttname"><a href="../../d6/d98/classnars_1_1language_1_1Conjunction.html">nars.language.Conjunction</a></div><div class="ttdoc">Conjunction of statements. </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d2f/Conjunction_8java_source.html#l00031">Conjunction.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_a3aad4654016b8615fd4fa8a26668e1db_html_a3aad4654016b8615fd4fa8a26668e1db"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_a3aad4654016b8615fd4fa8a26668e1db.html#a3aad4654016b8615fd4fa8a26668e1db">nars.language.Term.getName</a></div><div class="ttdeci">String getName()</div><div class="ttdoc">Reporting the name of the current Term. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00068">Term.java:68</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a52a0cc8bcdfeb683433fb4dfdd167554_html_a52a0cc8bcdfeb683433fb4dfdd167554"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a52a0cc8bcdfeb683433fb4dfdd167554.html#a52a0cc8bcdfeb683433fb4dfdd167554">nars.io.Symbols.PREFIX_MARK</a></div><div class="ttdeci">static final char PREFIX_MARK</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00082">Symbols.java:82</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1Parameters_a0e475172e99cbaf68ced7ec12e39fa52_html_a0e475172e99cbaf68ced7ec12e39fa52"><div class="ttname"><a href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_a0e475172e99cbaf68ced7ec12e39fa52.html#a0e475172e99cbaf68ced7ec12e39fa52">nars.storage.Memory.Parameters.DEFAULT_JUDGMENT_DURABILITY</a></div><div class="ttdeci">static final float DEFAULT_JUDGMENT_DURABILITY</div><div class="ttdoc">Default durability of input judgment. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l01110">Memory.java:1110</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1SetExt_html"><div class="ttname"><a href="../../de/d1d/classnars_1_1language_1_1SetExt.html">nars.language.SetExt</a></div><div class="ttdoc">An extensionally defined set, which contains one or more instances. </div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d96/SetExt_8java_source.html#l00031">SetExt.java:31</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_1_1InvalidInputException_html"><div class="ttname"><a href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException.html">nars.io.StringParser.InvalidInputException</a></div><div class="ttdoc">All kinds of invalid input lines. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00041">StringParser.java:41</a></div></div>
<div class="ttc" id="namespacenars_1_1entity_html"><div class="ttname"><a href="../../db/dec/namespacenars_1_1entity.html">nars.entity</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00021">BudgetValue.java:21</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a3c16442588a8be88035d635e13c8c486_html_a3c16442588a8be88035d635e13c8c486"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a3c16442588a8be88035d635e13c8c486.html#a3c16442588a8be88035d635e13c8c486">nars.io.Symbols.STATEMENT_CLOSER</a></div><div class="ttdeci">static final char STATEMENT_CLOSER</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00046">Symbols.java:46</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a841830a5d2348da4024f4db083b37c2a_html_a841830a5d2348da4024f4db083b37c2a"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a841830a5d2348da4024f4db083b37c2a.html#a841830a5d2348da4024f4db083b37c2a">nars.io.StringParser.topRelation</a></div><div class="ttdeci">static int topRelation(String s)</div><div class="ttdoc">locate the top-level relation in a statement </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00416">StringParser.java:416</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1Parameters_a8baa6ec51e3c1b2be699ce7010edbd72_html_a8baa6ec51e3c1b2be699ce7010edbd72"><div class="ttname"><a href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_a8baa6ec51e3c1b2be699ce7010edbd72.html#a8baa6ec51e3c1b2be699ce7010edbd72">nars.storage.Memory.Parameters.DEFAULT_QUESTION_PRIORITY</a></div><div class="ttdeci">static final float DEFAULT_QUESTION_PRIORITY</div><div class="ttdoc">Default priority of input question. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l01112">Memory.java:1112</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_html"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory.html">nars.storage.Memory</a></div><div class="ttdoc">The memory of the system. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00051">Memory.java:51</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a773509e7bc6cbf7b365c90fc2e48dc6b_html_a773509e7bc6cbf7b365c90fc2e48dc6b"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a773509e7bc6cbf7b365c90fc2e48dc6b.html#a773509e7bc6cbf7b365c90fc2e48dc6b">nars.io.Symbols.STAMP_CLOSER</a></div><div class="ttdeci">static final char STAMP_CLOSER</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00088">Symbols.java:88</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1Parameters_html"><div class="ttname"><a href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters.html">nars.storage.Memory.Parameters</a></div><div class="ttdoc">Collected system parameters. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l01069">Memory.java:1069</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a26d10b6f39341c34897a5e4c66112bd9_html_a26d10b6f39341c34897a5e4c66112bd9"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a26d10b6f39341c34897a5e4c66112bd9.html#a26d10b6f39341c34897a5e4c66112bd9">nars.io.StringParser.getBudgetString</a></div><div class="ttdeci">static String getBudgetString(StringBuffer s)</div><div class="ttdoc">Return the prefex of a task string that contains a BudgetValue. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00127">StringParser.java:127</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a8543cf41a20f45b3e2ece8b7969ed15b_html_a8543cf41a20f45b3e2ece8b7969ed15b"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a8543cf41a20f45b3e2ece8b7969ed15b.html#a8543cf41a20f45b3e2ece8b7969ed15b">nars.io.Symbols.STAMP_OPENER</a></div><div class="ttdeci">static final char STAMP_OPENER</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00087">Symbols.java:87</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_ab78cb07d148cc233baf7f43ee8d302e9_html_ab78cb07d148cc233baf7f43ee8d302e9"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_ab78cb07d148cc233baf7f43ee8d302e9.html#ab78cb07d148cc233baf7f43ee8d302e9">nars.io.Symbols.ARGUMENT_SEPARATOR</a></div><div class="ttdeci">static final char ARGUMENT_SEPARATOR</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00053">Symbols.java:53</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a49d3b8184f455de9685937d0aa2f6a93_html_a49d3b8184f455de9685937d0aa2f6a93"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a49d3b8184f455de9685937d0aa2f6a93.html#a49d3b8184f455de9685937d0aa2f6a93">nars.io.StringParser.parseTruth</a></div><div class="ttdeci">static TruthValue parseTruth(String s, char type)</div><div class="ttdoc">parse the input String into a TruthValue (or DesireValue) </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00173">StringParser.java:173</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a75b6ca172df6ae3f0d06cf70d3d2ec1c_html_a75b6ca172df6ae3f0d06cf70d3d2ec1c"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a75b6ca172df6ae3f0d06cf70d3d2ec1c.html#a75b6ca172df6ae3f0d06cf70d3d2ec1c">nars.io.Symbols.INPUT_LINE</a></div><div class="ttdeci">static final String INPUT_LINE</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00080">Symbols.java:80</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_html"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser.html">nars.io.StringParser</a></div><div class="ttdoc">Parse input String into Task or Term. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00036">StringParser.java:36</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_ae9b91054186389c3930bc2aaecd4aee8_html_ae9b91054186389c3930bc2aaecd4aee8"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_ae9b91054186389c3930bc2aaecd4aee8.html#ae9b91054186389c3930bc2aaecd4aee8">nars.io.StringParser.isOpener</a></div><div class="ttdeci">static boolean isOpener(String s, int i)</div><div class="ttdoc">Check CompoundTerm opener symbol. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00440">StringParser.java:440</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a13b034b1bca44b2f3d3c8de6d1607047_html_a13b034b1bca44b2f3d3c8de6d1607047"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a13b034b1bca44b2f3d3c8de6d1607047.html#a13b034b1bca44b2f3d3c8de6d1607047">nars.io.Symbols.JUDGMENT_MARK</a></div><div class="ttdeci">static final char JUDGMENT_MARK</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00029">Symbols.java:29</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Task_html"><div class="ttname"><a href="../../dc/ddc/classnars_1_1entity_1_1Task.html">nars.entity.Task</a></div><div class="ttdoc">A task to be processed, consists of a Sentence and a BudgetValue. </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d10/Task_8java_source.html#l00035">Task.java:35</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Statement_a4e4c29fc305a6741da88ce55fbf11e4a_html_a4e4c29fc305a6741da88ce55fbf11e4a"><div class="ttname"><a href="../../d1/d5e/classnars_1_1language_1_1Statement_a4e4c29fc305a6741da88ce55fbf11e4a.html#a4e4c29fc305a6741da88ce55fbf11e4a">nars.language.Statement.make</a></div><div class="ttdeci">static Statement make(String relation, Term subject, Term predicate, Memory memory)</div><div class="ttdoc">Make a Statement from String, called by StringParser. </div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d44/Statement_8java_source.html#l00068">Statement.java:68</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Statement_aef04a664a5871b608c654a3dbb7cfa84_html_aef04a664a5871b608c654a3dbb7cfa84"><div class="ttname"><a href="../../d1/d5e/classnars_1_1language_1_1Statement_aef04a664a5871b608c654a3dbb7cfa84.html#aef04a664a5871b608c654a3dbb7cfa84">nars.language.Statement.isRelation</a></div><div class="ttdeci">static boolean isRelation(String s0)</div><div class="ttdoc">Check Statement relation symbol, called in StringPaser. </div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d44/Statement_8java_source.html#l00143">Statement.java:143</a></div></div>
<div class="ttc" id="namespacenars_1_1inference_html"><div class="ttname"><a href="../../d9/d79/namespacenars_1_1inference.html">nars.inference</a></div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00021">BudgetFunctions.java:21</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Statement_html"><div class="ttname"><a href="../../d1/d5e/classnars_1_1language_1_1Statement.html">nars.language.Statement</a></div><div class="ttdoc">A statement is a compound term, consisting of a subject, a predicate, and a relation symbol in betwee...</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d44/Statement_8java_source.html#l00033">Statement.java:33</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_ab9662b963cff657c1089b306d3594efe_html_ab9662b963cff657c1089b306d3594efe"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_ab9662b963cff657c1089b306d3594efe.html#ab9662b963cff657c1089b306d3594efe">nars.io.Symbols.COMPOUND_TERM_CLOSER</a></div><div class="ttdeci">static final char COMPOUND_TERM_CLOSER</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00044">Symbols.java:44</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1CompoundTerm_ae4b161399fd4fa864f9a5cf6e1a4ed83_html_ae4b161399fd4fa864f9a5cf6e1a4ed83"><div class="ttname"><a href="../../d0/dee/classnars_1_1language_1_1CompoundTerm_ae4b161399fd4fa864f9a5cf6e1a4ed83.html#ae4b161399fd4fa864f9a5cf6e1a4ed83">nars.language.CompoundTerm.make</a></div><div class="ttdeci">static Term make(CompoundTerm compound, ArrayList&lt; Term &gt; components, Memory memory)</div><div class="ttdoc">Try to make a compound term from a template and a list of components. </div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d0e/CompoundTerm_8java_source.html#l00130">CompoundTerm.java:130</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a303071a44dc2adfc5d1b0a51058b9eb4_html_a303071a44dc2adfc5d1b0a51058b9eb4"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a303071a44dc2adfc5d1b0a51058b9eb4.html#a303071a44dc2adfc5d1b0a51058b9eb4">nars.io.Symbols.VALUE_SEPARATOR</a></div><div class="ttdeci">static final char VALUE_SEPARATOR</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00040">Symbols.java:40</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_html"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols.html">nars.io.Symbols</a></div><div class="ttdoc">The ASCII symbols used in I/O. </div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00026">Symbols.java:26</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1SetInt_html"><div class="ttname"><a href="../../d2/dfc/classnars_1_1language_1_1SetInt.html">nars.language.SetInt</a></div><div class="ttdoc">An intensionally defined set, which contains one or more instances defining the Term. </div><div class="ttdef"><b>Definition:</b> <a href="../../dc/dfd/SetInt_8java_source.html#l00031">SetInt.java:31</a></div></div>
<div class="ttc" id="namespacenars_1_1storage_html"><div class="ttname"><a href="../../de/ddc/namespacenars_1_1storage.html">nars.storage</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d6/dce/Bag_8java_source.html#l00021">Bag.java:21</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a5c31494d6f7862dcf15a4d5716b6200e_html_a5c31494d6f7862dcf15a4d5716b6200e"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a5c31494d6f7862dcf15a4d5716b6200e.html#a5c31494d6f7862dcf15a4d5716b6200e">nars.io.StringParser.parseTerm</a></div><div class="ttdeci">static Term parseTerm(String s0, Memory memory)</div><div class="ttdoc">Top-level method that parse a Term in general, which may recursively call itself. ...</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00241">StringParser.java:241</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_1_1InvalidInputException_a3a93516417d09738e6742c6b4b95d181_html_a3a93516417d09738e6742c6b4b95d181"><div class="ttname"><a href="../../dd/d95/classnars_1_1io_1_1StringParser_1_1InvalidInputException_a3a93516417d09738e6742c6b4b95d181.html#a3a93516417d09738e6742c6b4b95d181">nars.io.StringParser.InvalidInputException.InvalidInputException</a></div><div class="ttdeci">InvalidInputException(String s)</div><div class="ttdoc">An invalid input line. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00047">StringParser.java:47</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1Parameters_acbc0d248cbd19cca521940073d596846_html_acbc0d248cbd19cca521940073d596846"><div class="ttname"><a href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_acbc0d248cbd19cca521940073d596846.html#acbc0d248cbd19cca521940073d596846">nars.storage.Memory.Parameters.DEFAULT_QUESTION_DURABILITY</a></div><div class="ttdeci">static final float DEFAULT_QUESTION_DURABILITY</div><div class="ttdoc">Default durability of input question. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l01114">Memory.java:1114</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_aa8d204dd29cc8dd9793f8dfe7c4ff979_html_aa8d204dd29cc8dd9793f8dfe7c4ff979"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_aa8d204dd29cc8dd9793f8dfe7c4ff979.html#aa8d204dd29cc8dd9793f8dfe7c4ff979">nars.io.Symbols.OUTPUT_LINE</a></div><div class="ttdeci">static final String OUTPUT_LINE</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00081">Symbols.java:81</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_ae7288e11164656038caf396c2c4b7a58_html_ae7288e11164656038caf396c2c4b7a58"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_ae7288e11164656038caf396c2c4b7a58.html#ae7288e11164656038caf396c2c4b7a58">nars.io.Symbols.COMPOUND_TERM_OPENER</a></div><div class="ttdeci">static final char COMPOUND_TERM_OPENER</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00043">Symbols.java:43</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Stamp_html"><div class="ttname"><a href="../../d1/d1e/classnars_1_1entity_1_1Stamp.html">nars.entity.Stamp</a></div><div class="ttdoc">Each Sentence has a time stamp, consisting the following components: (1) The creation time of the sen...</div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d4f/Stamp_8java_source.html#l00035">Stamp.java:35</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91_html_a5797bd2ee147531f4200cf66c7392a91"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a5797bd2ee147531f4200cf66c7392a91.html#a5797bd2ee147531f4200cf66c7392a91">nars.inference.BudgetFunctions.truthToQuality</a></div><div class="ttdeci">static float truthToQuality(TruthValue t)</div><div class="ttdoc">Determine the quality of a judgment by its truth value alone. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00043">BudgetFunctions.java:43</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a4521720744de2b8638667be01b4be64a_html_a4521720744de2b8638667be01b4be64a"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a4521720744de2b8638667be01b4be64a.html#a4521720744de2b8638667be01b4be64a">nars.io.StringParser.parseAtomicTerm</a></div><div class="ttdeci">static Term parseAtomicTerm(String s0)</div><div class="ttdoc">Parse a Term that has no internal structure. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00303">StringParser.java:303</a></div></div>
<div class="ttc" id="namespacenars_html"><div class="ttname"><a href="../../d7/d81/namespacenars.html">nars</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Sentence_html"><div class="ttname"><a href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">nars.entity.Sentence</a></div><div class="ttdoc">A Sentence is an abstract class, mainly containing a Term, a TruthValue, and a Stamp. </div><div class="ttdef"><b>Definition:</b> <a href="../../da/d1c/Sentence_8java_source.html#l00031">Sentence.java:31</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a7a11182c36a2fae68be8952110f47570_html_a7a11182c36a2fae68be8952110f47570"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a7a11182c36a2fae68be8952110f47570.html#a7a11182c36a2fae68be8952110f47570">nars.io.StringParser.parseArguments</a></div><div class="ttdeci">static ArrayList&lt; Term &gt; parseArguments(String s0, Memory memory)</div><div class="ttdoc">Parse a String into the argument get of a CompoundTerm. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00368">StringParser.java:368</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a37ff864d959aba58138170a3f9a3e7c8_html_a37ff864d959aba58138170a3f9a3e7c8"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a37ff864d959aba58138170a3f9a3e7c8.html#a37ff864d959aba58138170a3f9a3e7c8">nars.io.StringParser.parseExperience</a></div><div class="ttdeci">static Task parseExperience(StringBuffer buffer, Memory memory, long time)</div><div class="ttdoc">Parse a line of input experience. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00061">StringParser.java:61</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a7c129938c8d721e3db0a9804988f0588_html_a7c129938c8d721e3db0a9804988f0588"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a7c129938c8d721e3db0a9804988f0588.html#a7c129938c8d721e3db0a9804988f0588">nars.io.StringParser.parseStatement</a></div><div class="ttdeci">static Statement parseStatement(String s0, Memory memory)</div><div class="ttdoc">Parse a String to create a Statement. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00325">StringParser.java:325</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_html"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions.html">nars.inference.BudgetFunctions</a></div><div class="ttdoc">Budget functions for resources allocation. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00031">BudgetFunctions.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Variable_a2c36e85a56295a27aba7a4ee162f5850_html_a2c36e85a56295a27aba7a4ee162f5850"><div class="ttname"><a href="../../de/da5/classnars_1_1language_1_1Variable_a2c36e85a56295a27aba7a4ee162f5850.html#a2c36e85a56295a27aba7a4ee162f5850">nars.language.Variable.containVar</a></div><div class="ttdeci">static boolean containVar(String n)</div><div class="ttdoc">Check whether a string represent a name of a term that contains a variable. </div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de0/Variable_8java_source.html#l00098">Variable.java:98</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_html"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">nars.entity.TruthValue</a></div><div class="ttdoc">Frequency and confidence. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00028">TruthValue.java:28</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a4fc8012616d44d8e7670044f9a0d2976_html_a4fc8012616d44d8e7670044f9a0d2976"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a4fc8012616d44d8e7670044f9a0d2976.html#a4fc8012616d44d8e7670044f9a0d2976">nars.io.StringParser.showWarning</a></div><div class="ttdeci">static void showWarning(String message)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00290">StringParser.java:290</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1Parameters_a9b02deb2e403b931a0809a14c1754ae1_html_a9b02deb2e403b931a0809a14c1754ae1"><div class="ttname"><a href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_a9b02deb2e403b931a0809a14c1754ae1.html#a9b02deb2e403b931a0809a14c1754ae1">nars.storage.Memory.Parameters.DEFAULT_JUDGMENT_CONFIDENCE</a></div><div class="ttdeci">static final float DEFAULT_JUDGMENT_CONFIDENCE</div><div class="ttdoc">Default confidence of input judgment. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l01106">Memory.java:1106</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a3bc6ba8295af16e7dc108ea61af132c4_html_a3bc6ba8295af16e7dc108ea61af132c4"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a3bc6ba8295af16e7dc108ea61af132c4.html#a3bc6ba8295af16e7dc108ea61af132c4">nars.io.Symbols.SET_EXT_OPENER</a></div><div class="ttdeci">static final char SET_EXT_OPENER</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00047">Symbols.java:47</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_aa197c4c362373f0e74165794ba7b033a_html_aa197c4c362373f0e74165794ba7b033a"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_aa197c4c362373f0e74165794ba7b033a.html#aa197c4c362373f0e74165794ba7b033a">nars.io.StringParser.nextSeparator</a></div><div class="ttdeci">static int nextSeparator(String s, int first)</div><div class="ttdoc">Locate the first top-level separator in a CompoundTerm. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00393">StringParser.java:393</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_aed850ddff0dd1a47065099f5fccd5dfe_html_aed850ddff0dd1a47065099f5fccd5dfe"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_aed850ddff0dd1a47065099f5fccd5dfe.html#aed850ddff0dd1a47065099f5fccd5dfe">nars.io.Symbols.SET_EXT_CLOSER</a></div><div class="ttdeci">static final char SET_EXT_CLOSER</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00048">Symbols.java:48</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a944bb677dff9f232ce6b896c853e24e0_html_a944bb677dff9f232ce6b896c853e24e0"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a944bb677dff9f232ce6b896c853e24e0.html#a944bb677dff9f232ce6b896c853e24e0">nars.io.StringParser.parseCompoundTerm</a></div><div class="ttdeci">static Term parseCompoundTerm(String s0, Memory memory)</div><div class="ttdoc">Parse a String to create a CompoundTerm. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00347">StringParser.java:347</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a54fee577660cb416592b3ee290e6a7c5_html_a54fee577660cb416592b3ee290e6a7c5"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a54fee577660cb416592b3ee290e6a7c5.html#a54fee577660cb416592b3ee290e6a7c5">nars.io.Symbols.SET_INT_OPENER</a></div><div class="ttdeci">static final char SET_INT_OPENER</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00049">Symbols.java:49</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a771c007b010d86c032ee6d181f080ed8_html_a771c007b010d86c032ee6d181f080ed8"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a771c007b010d86c032ee6d181f080ed8.html#a771c007b010d86c032ee6d181f080ed8">nars.io.Symbols.QUESTION_MARK</a></div><div class="ttdeci">static final char QUESTION_MARK</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00030">Symbols.java:30</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a42009f5202d1b120b098593f7b48dbad_html_a42009f5202d1b120b098593f7b48dbad"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a42009f5202d1b120b098593f7b48dbad.html#a42009f5202d1b120b098593f7b48dbad">nars.io.Symbols.BUDGET_VALUE_MARK</a></div><div class="ttdeci">static final char BUDGET_VALUE_MARK</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00038">Symbols.java:38</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_abc6f38df6d7517b21ecf27b34da1a2ea_html_abc6f38df6d7517b21ecf27b34da1a2ea"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_abc6f38df6d7517b21ecf27b34da1a2ea.html#abc6f38df6d7517b21ecf27b34da1a2ea">nars.io.Symbols.STATEMENT_OPENER</a></div><div class="ttdeci">static final char STATEMENT_OPENER</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00045">Symbols.java:45</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_html"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term.html">nars.language.Term</a></div><div class="ttdoc">Term is the basic component of Narsese, and the object of processing in NARS. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00040">Term.java:40</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a75b446999d71c676a9915ecc75077a7d_html_a75b446999d71c676a9915ecc75077a7d"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a75b446999d71c676a9915ecc75077a7d.html#a75b446999d71c676a9915ecc75077a7d">nars.io.StringParser.parseTask</a></div><div class="ttdeci">static Task parseTask(String s, Memory memory, long time)</div><div class="ttdoc">Enter a new Task in String into the memory, called from InputWindow or locally. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00086">StringParser.java:86</a></div></div>
<div class="ttc" id="namespacenars_1_1language_html"><div class="ttname"><a href="../../d0/d72/namespacenars_1_1language.html">nars.language</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d0e/CompoundTerm_8java_source.html#l00021">CompoundTerm.java:21</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a1487df93cb7e583ecaec1f9b8a7941cd_html_a1487df93cb7e583ecaec1f9b8a7941cd"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a1487df93cb7e583ecaec1f9b8a7941cd.html#a1487df93cb7e583ecaec1f9b8a7941cd">nars.io.Symbols.TRUTH_VALUE_MARK</a></div><div class="ttdeci">static final char TRUTH_VALUE_MARK</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00039">Symbols.java:39</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1CompoundTerm_ad1d227398882f18af4624dd506c807c5_html_ad1d227398882f18af4624dd506c807c5"><div class="ttname"><a href="../../d0/dee/classnars_1_1language_1_1CompoundTerm_ad1d227398882f18af4624dd506c807c5.html#ad1d227398882f18af4624dd506c807c5">nars.language.CompoundTerm.isOperator</a></div><div class="ttdeci">static boolean isOperator(String s)</div><div class="ttdoc">Check CompoundTerm operator symbol. </div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d0e/CompoundTerm_8java_source.html#l00198">CompoundTerm.java:198</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a4d012f80fe3fabafafdd7ffd31bb9d23_html_a4d012f80fe3fabafafdd7ffd31bb9d23"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a4d012f80fe3fabafafdd7ffd31bb9d23.html#a4d012f80fe3fabafafdd7ffd31bb9d23">nars.io.StringParser.parseBudget</a></div><div class="ttdeci">static BudgetValue parseBudget(String s, char punctuation, TruthValue truth)</div><div class="ttdoc">parse the input String into a BudgetValue </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00200">StringParser.java:200</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_aa579e2d90aa176b8fa99af6fda484bf7_html_aa579e2d90aa176b8fa99af6fda484bf7"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_aa579e2d90aa176b8fa99af6fda484bf7.html#aa579e2d90aa176b8fa99af6fda484bf7">nars.io.StringParser.isCloser</a></div><div class="ttdeci">static boolean isCloser(String s, int i)</div><div class="ttdoc">Check CompoundTerm closer symbol. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00461">StringParser.java:461</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Variable_a3a7ee29b5a23255edf3dbca5f85f7b44_html_a3a7ee29b5a23255edf3dbca5f85f7b44"><div class="ttname"><a href="../../de/da5/classnars_1_1language_1_1Variable_a3a7ee29b5a23255edf3dbca5f85f7b44.html#a3a7ee29b5a23255edf3dbca5f85f7b44">nars.language.Variable.containVarDep</a></div><div class="ttdeci">static boolean containVarDep(String n)</div><div class="ttdoc">Check whether a string represent a name of a term that contains a dependent variable. </div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de0/Variable_8java_source.html#l00080">Variable.java:80</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a63058cc52d77412e0aead8387c23aa93_html_a63058cc52d77412e0aead8387c23aa93"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a63058cc52d77412e0aead8387c23aa93.html#a63058cc52d77412e0aead8387c23aa93">nars.storage.Memory.nameToListedTerm</a></div><div class="ttdeci">Term nameToListedTerm(String name)</div><div class="ttdoc">Get a Term for a given name of a Concept or Operator. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00152">Memory.java:152</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1CompoundTerm_html"><div class="ttname"><a href="../../d0/dee/classnars_1_1language_1_1CompoundTerm.html">nars.language.CompoundTerm</a></div><div class="ttdoc">A CompoundTerm is a Term with internal (syntactic) structure. </div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d0e/CompoundTerm_8java_source.html#l00036">CompoundTerm.java:36</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Variable_html"><div class="ttname"><a href="../../de/da5/classnars_1_1language_1_1Variable.html">nars.language.Variable</a></div><div class="ttdoc">A variable term, which does not correspond to a concept. </div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de0/Variable_8java_source.html#l00030">Variable.java:30</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1SetInt_aaea0f2cc2ca804779d1bf346beb58fa1_html_aaea0f2cc2ca804779d1bf346beb58fa1"><div class="ttname"><a href="../../d2/dfc/classnars_1_1language_1_1SetInt_aaea0f2cc2ca804779d1bf346beb58fa1.html#aaea0f2cc2ca804779d1bf346beb58fa1">nars.language.SetInt.make</a></div><div class="ttdeci">static Term make(Term t, Memory memory)</div><div class="ttdoc">Try to make a new set from one component. </div><div class="ttdef"><b>Definition:</b> <a href="../../dc/dfd/SetInt_8java_source.html#l00067">SetInt.java:67</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1BudgetValue_html"><div class="ttname"><a href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">nars.entity.BudgetValue</a></div><div class="ttdoc">A triple of priority (current), durability (decay), and quality (long-term average). </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00031">BudgetValue.java:31</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1Parameters_a19b3ac0c78139a1e780b01c9aeaebb24_html_a19b3ac0c78139a1e780b01c9aeaebb24"><div class="ttname"><a href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_a19b3ac0c78139a1e780b01c9aeaebb24.html#a19b3ac0c78139a1e780b01c9aeaebb24">nars.storage.Memory.Parameters.DEFAULT_JUDGMENT_PRIORITY</a></div><div class="ttdeci">static final float DEFAULT_JUDGMENT_PRIORITY</div><div class="ttdoc">Default priority of input judgment. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l01108">Memory.java:1108</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_aea87151443aa0d48255ee040f32bd1d0_html_aea87151443aa0d48255ee040f32bd1d0"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_aea87151443aa0d48255ee040f32bd1d0.html#aea87151443aa0d48255ee040f32bd1d0">nars.io.Symbols.SET_INT_CLOSER</a></div><div class="ttdeci">static final char SET_INT_CLOSER</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00050">Symbols.java:50</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a2f7d01638f8e9c5e2e1e1500689b5fc8_html_a2f7d01638f8e9c5e2e1e1500689b5fc8"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a2f7d01638f8e9c5e2e1e1500689b5fc8.html#a2f7d01638f8e9c5e2e1e1500689b5fc8">nars.io.StringParser.getTruthString</a></div><div class="ttdeci">static String getTruthString(StringBuffer s)</div><div class="ttdoc">Return the postfix of a task string that contains a TruthValue. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00149">StringParser.java:149</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_ed82ebcd34e530b246c6fd9032262140.html">aruntime</a></li><li class="navelem"><a class="el" href="../../dir_19496ddff8e6c0f2b6654287ecb1a472.html">src</a></li><li class="navelem"><a class="el" href="../../dir_db9c5934f797909f7296c2c2017f7fc9.html">main</a></li><li class="navelem"><a class="el" href="../../dir_6d74390eb6d6287951075e525bcb9bed.html">java</a></li><li class="navelem"><a class="el" href="../../dir_51a24984472456d47100350cd31f9a7c.html">nars</a></li><li class="navelem"><a class="el" href="../../dir_aab9dfc51d7cf7443c970bdaa3292fa7.html">io</a></li><li class="navelem"><a class="el" href="../../d7/dcd/StringParser_8java.html">StringParser.java</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:58 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
